The present invention relates to a polarity detector for subscriber lines for detecting a polarity of subscriber lines in a data transmitting system having 2-wire subscriber lines using 2B1Q (two binary--one quaternary) codes.
In the 2B1Q code, "1","1" in binary notation is set to +1 in quaternary notation, "1","0" in binary notation is set to +3 in quaternary notation, "0","1" in binary notation is set to -1 in quaternary notation and "0","0" in binary notation is set to -3 in quaternary notation. Development of a point U interface for an Integrated Services Digital Network (ISDN) using a 2B1Q code as described above has been ongoing. A U interface is a service access point between an office line control unit and a distributed subscriber line control unit. It can be used, for example, as an interface between subscriber lines and a PBX. It is well known in the art. If the connecting polarity of the 2-wire subscriber lines of the point U interface is inverted, when the quaternary code is converted to binary code through polarity inversion, the binary code on the receiving side is different from that on the sending side. Therefore, it is essential to correctly decode the quaternary code by deciding whether or not the connecting polarity of the 2-wire subscriber lines has been inverted.
Development of a 2-wire subscriber line transmission system using the 2B1Q code for an ISDN has been continuing. For instance, in FIG. 1, a subscriber terminal 101 is connected to an office line control unit OCU 103 by a 2-wire subscriber line 104 through a distributed subscriber line control unit DSU 102. The 2B1Q code data is transmitted to the subscriber line 104. The distributed subscriber line control unit 102 and the office line control unit 103, respectively, include interfaces 105 and 110, line controllers 106 and 109, and subscriber line terminators 107 and 108. The line controllers 106 and 109 are provided with functions for multiplexing and demultiplexing control of the subscriber terminators 107 and 108, and functions for code conversion from binary to quaternary code and timing extraction.
FIG. 2 is a chart of sending frames in binary code. A superframe is formed by eight frames from #1 to #8. The period of each frame is 1.5 ms and is formed by an 18 bits inversion frame synchronous signal ISW or a frame synchronous signal SW, 216 bits of 2B+D).times.12 data and a 6 bits M channel. 2B+D refers to a basic interface structure in which two B channels and one D channel are provided. The letter B in 2B+D indicates a B channel of 64 Kbps, while the letter D indicates a D channel of 16 Kbps. In FIG. 2, the 2B+D code has 216 bits in which 96 bits are allocated to each of the B channels and 24 bits are allocated to the D channel.
The 2-wire subscriber line transmission system using the 2B1Q code explained above is standardized by the American National Standards Institute Regulation which specifies that a couple of lines are sometimes connected through two inversion lines. It is required that normal data transmission be realized even when the connecting polarity of the 2-wire subscriber lines 104 is inverted.
The subscriber line terminators 107 and 108 of the digital subscriber system shown in FIG. 1 are shown in more detail in FIG. 3. The office line control unit (OCU) 103 is connected to a TIP terminal and a RING terminal of the subscriber line 104 through a hybrid transformer 1081. The line controller 109 assembles the data sent from an exchange to the sending frame having the format shown in FIG. 2 and then sends the frame to the code converter 1083. The code converter 1083 converts a binary non-return-to-zero (NRZ) code sent from the line controller 109 into a quaternary 2B1Q code, amplifies it up to a predetermined level and thereafter, sends it to a balance/unbalance converter 1082.
The balance/unbalance converter 1082 performs a balance/unbalance conversion of the 2B1Q code sent from the code converter 1083 in order to send it through the hybrid transformer 1081 and over the 2-wire subscriber line 104. Thus, the data sent from the exchange is transmitted to the distributed subscriber line control unit 102 through the 2-wire subscriber line 104.
The 2B1Q data from the distributed subscriber line control unit 102 is sent through the 2-wire subscriber unit 104 and the hybrid transformer 1081 and is received by a balance/unbalance conversion circuit 1085. The balance/unbalance conversion circuit 1085 differentially amplifies the signal waveform appearing across the TIP terminal and the RING terminal. The differentially amplified signal on the 2-wire subscriber line is waveform equalized by an equalizing amplifier 1086 and a timing signal is extracted therefrom. The code converter 1087 converts the 2B1Q code data sent from the equalizing amplifier 1086 into binary NRZ data based on the extracted timing signal and sends it to the line controller 109. The line controller 109 demodulates the binary NRZ data sent from the code converter 1087 (in the sending frame format shown in FIG. 2) and sends it to an exchange through an interface 110. Each section of the distributed subscriber line control unit 102 operates in the same way as the office line control unit 103. When the TIP and RING terminals of the 2-wire subscriber line 104 are inversely connected, the balance/unbalance converter 1085 outputs inverted 2B1Q code data since it differentially amplifies the signal.
FIG. 4 is a timing diagram for the operation of the circuit shown in FIG. 3. The waveform A in FIG. 4, which is the 2B1Q code under normal polarity, is changed to the waveform B by inverting the connecting polarity of the TIP and RING terminals of the subscriber line 104. Therefore, the binary code obtained by receiving and decoding the waveform A is quite different from the binary code obtained by receiving and decoding the waveform B. Accordingly, it is necessary to receive correct data. This is accomplished by detecting the connecting polarity of the subscriber line.